package com.example.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.beans.factory.annotation.Value;

import javax.validation.constraints.NotNull;

public class DefaultValueEntity {
    private int age;
    @Value("1")
    private Integer ages;
    //@NotNull(message = "zhu")
    @NotNull
    private String name;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Integer getAges() {
        return ages;
    }

    public void setAges(Integer ages) {
        this.ages = ages;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "DefaultValueEntity{" +
                "age=" + age +
                ", ages=" + ages +
                ", name=" + name  +
                '}';
    }

    public static void main(String[] args) {
        DefaultValueEntity entity = new DefaultValueEntity();
        System.out.println(entity);
    }
}
